/*!
 * @file        apm32f0xx_int.c
 *
 * @brief       Main Interrupt Service Routines
 *
 * @version     V1.0.3
 *
 * @date        2022-09-20
 *
 * @attention
 *
 *  Copyright (C) 2020-2022 Geehy Semiconductor
 *
 *  You may not use this file except in compliance with the
 *  GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE).
 *
 *  The program is only for reference, which is distributed in the hope
 *  that it will be useful and instructional for customers to develop
 *  their software. Unless required by applicable law or agreed to in
 *  writing, the program is distributed on an "AS IS" BASIS, WITHOUT
 *  ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions
 *  and limitations under the License.
 */

/* Includes */
#include "apm32f0xx_int.h"
#include "main.h"
#include "usart.h"
#include "key.h"
#include "timer.h"


/** @addtogroup Examples
  @{
  */

/** @addtogroup GPIO_Toggle
  @{
  */

/** @defgroup GPIO_Toggle_INT_Macros INT_Macros
  @{
  */

/**@} end of group GPIO_Toggle_INT_Macros */

/** @defgroup GPIO_Toggle_INT_Enumerations INT_Enumerations
  @{
  */

/**@} end of group GPIO_Toggle_INT_Enumerations */

/** @defgroup GPIO_Toggle_INT_Structures INT_Structures
  @{
  */

/**@} end of group GPIO_Toggle_INT_Structures */

/** @defgroup GPIO_Toggle_INT_Variables INT_Variables
  @{
  */

/**@} end of group GPIO_Toggle_INT_Variables */

/** @defgroup GPIO_Toggle_INT_Functions INT_Functions
  @{
  */

/*!
 * @brief       This function handles NMI exception
 *
 * @param       None
 *
 * @retval      None
 *
 * @note
 */
 
 void USART2_IRQHandler(void)
 {
	 
//	USART_Receive_Isr();
//	 USART_Send_Isr();
 }
 
 
void USART1_IRQHandler(void)
{
	USART_Receive_Isr();
}
 
void NMI_Handler(void)
{
	
}

/*!
 * @brief       This function handles Hard Fault exception
 *
 * @param       None
 *
 * @retval      None
 *
 * @note
 */
void HardFault_Handler(void)
{
}

/*!
 * @brief       This function handles SVCall exception
 *
 * @param       None
 *
 * @retval      None
 *
 * @note
 */
/*void SVC_Handler(void)
{
}*/

/*!
 * @brief       This function handles PendSV_Handler exception
 *
 * @param       None
 *
 * @retval      None
 *
 * @note
 */
//void PendSV_Handler(void)
//{
//}

/*!
 * @brief       This function handles SysTick exception
 *
 * @param       None
 *
 * @retval      None
 *
 * @note
 */





void TMR14_IRQHandler(void)
{ 
	if (TMR_ReadIntFlag(TMR14, TMR_INT_FLAG_UPDATE) == SET)
    { 
					TMR14Isr();
        TMR_ClearIntFlag(TMR14, TMR_INT_FLAG_UPDATE);
    }
	
}



void TMR3_IRQHandler(void)
{ 
	if (TMR_ReadIntFlag(TMR3, TMR_INT_FLAG_UPDATE) == SET)
    { 
					TMR3Isr();
        TMR_ClearIntFlag(TMR3, TMR_INT_FLAG_UPDATE);
    }
	
}



void TMR6_IRQHandler(void)
{ 
	if (TMR_ReadIntFlag(TMR6, TMR_INT_FLAG_UPDATE) == SET)
    { 
					TMR6Isr();
        TMR_ClearIntFlag(TMR6, TMR_INT_FLAG_UPDATE);
    }
	
}







//void SysTick_Handler(void)
//{
//	
//}



/**@} end of group GPIO_Toggle_INT_Functions */
/**@} end of group GPIO_Toggle */
/**@} end of group Examples */
